﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>page</title>
    <style>
        body, html { background-color: black; }
    </style>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js" type="text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        //var versionKey = "pgver" + location.pathname;
        var versionKey = "MasterVersion";
        var version = window.PageVersion = (window.localStorage ? localStorage[versionKey] : null) || parseInt("0XvXvXv") || (new Date()).getTime();
        if (window.localStorage)
            localStorage.setItem(versionKey, version);
        jQuery.ajax({ type: "HEAD", url: "App/@MasterVersion.txt", cache: false,
            success: function (d, s, xr) {
                var modified = xr.getResponseHeader("Last-Modified");
                if (modified) {
                    var modtime = new Date(modified).getTime();
                    var delta = modtime - version;
                    if (delta > 0) {
                        version = modtime;
                        if (window.localStorage) {
                            localStorage.setItem(versionKey, version);
                            //alert("newer");
                            location.reload(true);
                        }
                    }
                    if (window.console)
                        console.log("master.html modified delta = " + delta);
                }
            }
        });
        document.write('<' + 'link rel="Stylesheet" type="text/css" href="Scripts/Css/master.css?_=' + version + '"/>');
        document.write('<' + 'script src="Scripts/Scripts/master.js?_=' + version + '"><' + '/script>');
    </script>
</head>
<body>
</body>
</html>
